<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/11/24
 * Time: 15:29
 */

namespace app\api\model;


class ReceiveTask extends BaseModel
{
    public function user(){
        return $this->belongsTo('User', 'user_id', 'id')->bind('nickname,avatar');
    }

//    public function nickname(){
//        return $this->belongsTo('User','user_id','id');
//    }

    public function task(){
        return $this->belongsTo('Task', 'task_id', 'id')->bind('number,wechat_id');
    }

    public function taskUser(){
        return $this->belongsTo('Task', 'task_id', 'id')->bind('nickname,number,wechat_id,avatar');
    }
}